package com.wl.common.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wl.common.mybatis.model.AbstractBaseDeleteModel;
import com.wl.common.core.constant.ConstantSystem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author: wanglin
 * @date: 2023-09-18 周一
 * @Version: 1.0
 * @Description: 后台资源类型表，在细粒度进行权限控制时，可能资源会比较多，所以设计了个资源类型的概念，便于给角色分配资源。
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = SysResourceCategory.TABLE_NAME)
@Table(appliesTo = SysResourceCategory.TABLE_NAME, comment = "后台资源类型表")
@TableName(value = SysResourceCategory.TABLE_NAME)
public class SysResourceCategory extends AbstractBaseDeleteModel {
    public static final String TABLE_NAME = ConstantSystem.TABLE_PREFIX + "resource_category";
    @Column(columnDefinition = "varchar(100) comment '分类名称'", nullable = false)
    private String name;
    @Column(columnDefinition = "int(1) default 1 comment '资源类型等级'")
    private Integer level;
    @Column(columnDefinition = "int(11) comment '排序号'")
    private Integer orderIndex;
}